import { createRouter, createWebHistory } from 'vue-router';

export default createRouter({
  // 页面跳转回到顶部
  history: createWebHistory(),
  routes: [
    {
      // 主页
      path: '/',
      name: 'Home',
      component: () => import('@/pages/login/index.vue'),
    },
    {
      // 我的
      path: '/my/:id',
      name: 'My',
      component: () => import('@/pages/home/my.vue'),
    },
    {
      // 创建
      path: '/creation/:id',
      name: 'creation',
      component: () => import('@/pages/home/creation/index.vue'),
    },
    {
      // 登录
      path: '/login',
      name: 'Login',
      component: () => import('@/pages/login/index.vue'),
    },
    {
      // 屏幕
      path: '/screen/:id',
      name: 'screen',
      component: () => import('@/pages/screen/index.vue'),
    },
    {
      // 预览
      path: '/preview/:id',
      name: 'preview',
      component: () => import('@/pages/preview/index.vue'),
    },
  ],
});
